package com.scott.ch00;

/**
 * @author 黄后林
 * @version 1.0
 * @note
 * @date 2022-05-25 22:21:40
 */
public class Client {

    public static void main(String[] args) throws Exception{

        Client c = new Client();

        System.out.println(">>>"+c.add());
    }


    public int add() throws Exception{

        try {

            addBB();
            addAA();
        }catch ( RuntimeException aa){
            System.out.println("----------");
            System.out.println(aa);
            return 0;
        }
        return -1;
    }

    public int addAA() throws AAException{

        throw new AAException();
    }

    public int addBB() throws BBException{

        // 这是测试代码
        throw new BBException();
    }
}
